package com.tjbank.cssys.mybatis.mapper;

import com.tjbank.cssys.mybatis.entity.IamPermission;
import com.tjbank.cssys.mybatis.entity.IamPermissionKey;
import com.tjbank.cssys.mybatis.sqlbuilder.IamPermissionSqlBuilder;

import java.util.List;

/**
 * IamPermissionMapper
 * 
 * @author PG(Auto Generator)
 * @version V2.0
 */
public interface IamPermissionMapper {

    /**
     * 根据SqlBuilder查询列表，返回值包含大字段栏位
     * 
     * @param iamPermissionSqlBuilder
     * @return
     * @throws Exception
     */
    public List<IamPermission> selectBySqlBuilderWithBLOBs(IamPermissionSqlBuilder iamPermissionSqlBuilder) throws RuntimeException;

    /**
     * 根据SqlBuilder查询列表，返回值不包含大字段栏位
     * 
     * @param iamPermissionSqlBuilder
     * @return
     * @throws Exception
     */
    public List<IamPermission> selectBySqlBuilder(IamPermissionSqlBuilder iamPermissionSqlBuilder) throws RuntimeException;

    /**
     * 根据主键查询单个对象
     * 
     * @param iamPermissionKey
     * @return
     * @throws Exception
     */
    public IamPermission selectByPrimaryKey(IamPermissionKey iamPermissionKey) throws RuntimeException;

    /**
     * 根据SqlBuilder统计记录条数
     * 
     * @param iamPermissionSqlBuilder
     * @return
     * @throws Exception
     */
    public long countBySqlBuilder(IamPermissionSqlBuilder iamPermissionSqlBuilder) throws RuntimeException;

    /**
     * 单条插入新增记录
     * 
     * @param iamPermission
     * @return
     * @throws Exception
     */
    public int insert(IamPermission iamPermission) throws RuntimeException;

    /**
     * 批量插入新增记录
     * 
     * @param listIamPermission
     * @return
     * @throws Exception
     */
    public int insertUseBatch(List<IamPermission> listIamPermission) throws RuntimeException;

    /**
     * 根据SqlBuilder更新记录，空值会持久化到数据库
     * 
     * @param iamPermissionSqlBuilder
     * @return
     * @throws Exception
     */
    public int updateBySqlBuilder(IamPermissionSqlBuilder iamPermissionSqlBuilder) throws RuntimeException;

    /**
     * 根据SqlBuilder更新记录，空值不会持久化到数据库
     * 
     * @param iamPermissionSqlBuilder
     * @return
     * @throws Exception
     */
    public int updateBySqlBuilderSelective(IamPermissionSqlBuilder iamPermissionSqlBuilder) throws RuntimeException;

    /**
     * 根据主键更新记录，空值会持久化到数据库
     * 
     * @param iamPermissionKey
     * @return
     * @throws Exception
     */
    public int updateByPrimaryKey(IamPermissionKey iamPermissionKey) throws RuntimeException;

    /**
     * 根据主键更新记录，空值不会持久化到数据库
     * 
     * @param iamPermissionKey
     * @return
     * @throws Exception
     */
    public int updateByPrimaryKeySelective(IamPermissionKey iamPermissionKey) throws RuntimeException;

    /**
     * 根据SqlBuilder删除记录
     * 
     * @param iamPermissionSqlBuilder
     * @return
     * @throws Exception
     */
    public int deleteBySqlBuilder(IamPermissionSqlBuilder iamPermissionSqlBuilder) throws RuntimeException;

    /**
     * 根据主键删除记录
     * 
     * @param iamPermissionKey
     * @return
     * @throws Exception
     */
    public int deleteByPrimaryKey(IamPermissionKey iamPermissionKey) throws RuntimeException;

}